Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add localization for opensearch base map #312

Merged
merged 5 commits into from
Mar 17, 2023

Conversation

raintygao
Copy link
Contributor

Description

add localization for opensearch base map

Issues Resolved

#273

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@raintygao raintygao requested a review from a team March 2, 2023 07:50
@raintygao raintygao self-assigned this Mar 2, 2023
@codecov-commenter
Copy link

codecov-commenter commented Mar 2, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.76%. Comparing base (eb0bc0d) to head (4bb7b67).
Report is 75 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #312      +/-   ##
==========================================
- Coverage   85.00%   84.76%   -0.24%     
==========================================
  Files          14       14              
  Lines         400      407       +7     
  Branches       57       59       +2     
==========================================
+ Hits          340      345       +5     
- Misses         43       45       +2     
  Partials       17       17              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

common/util.ts Outdated
Comment on lines 12 to 13
const OSD_LANGUAGES = ['en', 'es', 'fr', 'de', 'ja', 'ko', 'zh'], // all these codes are also supported in vector tiles map
FALLBACK_LANGUAGE = 'en';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -41,6 +42,17 @@ const updateLayerConfig = (layerConfig: OSMLayerSpecification, maplibreRef: Mapl
handleStyleLayers(layerConfig, maplibreRef);
};

const localizationMapLayer = (maplibreRef: MaplibreRef, styleLayer: LayerSpecification) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: setLanguage

@raintygao raintygao requested review from VijayanB and junqiu-lei March 8, 2023 02:03
@raintygao raintygao merged commit 8744efb into opensearch-project:main Mar 17, 2023
opensearch-trigger-bot bot pushed a commit that referenced this pull request Mar 17, 2023
* feat: add localization for base map

Signed-off-by: raintygao <[email protected]>

* chore: update getlanguage order

Signed-off-by: raintygao <[email protected]>

* chore: move constants to index

Signed-off-by: raintygao <[email protected]>

* chore: update function name

Signed-off-by: raintygao <[email protected]>

---------

Signed-off-by: raintygao <[email protected]>
(cherry picked from commit 8744efb)
junqiu-lei pushed a commit that referenced this pull request Mar 20, 2023
* feat: add localization for base map

Signed-off-by: raintygao <[email protected]>

* chore: update getlanguage order

Signed-off-by: raintygao <[email protected]>

* chore: move constants to index

Signed-off-by: raintygao <[email protected]>

* chore: update function name

Signed-off-by: raintygao <[email protected]>

---------

Signed-off-by: raintygao <[email protected]>
(cherry picked from commit 8744efb)

Co-authored-by: raintygao <[email protected]>
VijayanB pushed a commit to VijayanB/dashboards-maps that referenced this pull request Mar 20, 2023
… (opensearch-project#351)

* feat: add localization for base map

Signed-off-by: raintygao <[email protected]>

* chore: update getlanguage order

Signed-off-by: raintygao <[email protected]>

* chore: move constants to index

Signed-off-by: raintygao <[email protected]>

* chore: update function name

Signed-off-by: raintygao <[email protected]>

---------

Signed-off-by: raintygao <[email protected]>
(cherry picked from commit 8744efb)

Co-authored-by: raintygao <[email protected]>
@raintygao
Copy link
Contributor Author

cc @kavilla FYI. This is phase 1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants